import random
i=random.randint(1,10)
#print(i)
a=0
count=0
while(True):
    a = int(input("请输入你要猜的数字"))
    count+=1
    if (i == a):
        print("猜对了")
        print("%d"%count)
        break
    else:
        if (a > i):
           print("猜大了")

        else:
            print("猜小了")




